// Dynamic tree editor - tree-like data structures editor for .NET/Mono.
// Copyright (C) 2006  Vladimir Sibirov
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace TreeEditor
{
	/// <summary>
	/// Application preferences and settings dialog form.
	/// </summary>
	public class PrefsDialog : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label labelLang;
		private System.Windows.Forms.ComboBox cbxLang;
		private System.Windows.Forms.Button buttonApply;
		private System.Windows.Forms.Button buttonCancel;
		private System.Windows.Forms.Label labelNote;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		
		/// <summary>
		/// Form constructor.
		/// </summary>
		public PrefsDialog()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PrefsDialog));
			this.labelLang = new System.Windows.Forms.Label();
			this.cbxLang = new System.Windows.Forms.ComboBox();
			this.buttonApply = new System.Windows.Forms.Button();
			this.buttonCancel = new System.Windows.Forms.Button();
			this.labelNote = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// labelLang
			// 
			this.labelLang.AccessibleDescription = resources.GetString("labelLang.AccessibleDescription");
			this.labelLang.AccessibleName = resources.GetString("labelLang.AccessibleName");
			this.labelLang.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("labelLang.Anchor")));
			this.labelLang.AutoSize = ((bool)(resources.GetObject("labelLang.AutoSize")));
			this.labelLang.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("labelLang.Dock")));
			this.labelLang.Enabled = ((bool)(resources.GetObject("labelLang.Enabled")));
			this.labelLang.Font = ((System.Drawing.Font)(resources.GetObject("labelLang.Font")));
			this.labelLang.Image = ((System.Drawing.Image)(resources.GetObject("labelLang.Image")));
			this.labelLang.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelLang.ImageAlign")));
			this.labelLang.ImageIndex = ((int)(resources.GetObject("labelLang.ImageIndex")));
			this.labelLang.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("labelLang.ImeMode")));
			this.labelLang.Location = ((System.Drawing.Point)(resources.GetObject("labelLang.Location")));
			this.labelLang.Name = "labelLang";
			this.labelLang.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("labelLang.RightToLeft")));
			this.labelLang.Size = ((System.Drawing.Size)(resources.GetObject("labelLang.Size")));
			this.labelLang.TabIndex = ((int)(resources.GetObject("labelLang.TabIndex")));
			this.labelLang.Text = resources.GetString("labelLang.Text");
			this.labelLang.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelLang.TextAlign")));
			this.labelLang.Visible = ((bool)(resources.GetObject("labelLang.Visible")));
			// 
			// cbxLang
			// 
			this.cbxLang.AccessibleDescription = resources.GetString("cbxLang.AccessibleDescription");
			this.cbxLang.AccessibleName = resources.GetString("cbxLang.AccessibleName");
			this.cbxLang.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("cbxLang.Anchor")));
			this.cbxLang.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("cbxLang.BackgroundImage")));
			this.cbxLang.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("cbxLang.Dock")));
			this.cbxLang.Enabled = ((bool)(resources.GetObject("cbxLang.Enabled")));
			this.cbxLang.Font = ((System.Drawing.Font)(resources.GetObject("cbxLang.Font")));
			this.cbxLang.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("cbxLang.ImeMode")));
			this.cbxLang.IntegralHeight = ((bool)(resources.GetObject("cbxLang.IntegralHeight")));
			this.cbxLang.ItemHeight = ((int)(resources.GetObject("cbxLang.ItemHeight")));
			this.cbxLang.Items.AddRange(new object[] {
														 resources.GetString("cbxLang.Items"),
														 resources.GetString("cbxLang.Items1"),
														 resources.GetString("cbxLang.Items2")});
			this.cbxLang.Location = ((System.Drawing.Point)(resources.GetObject("cbxLang.Location")));
			this.cbxLang.MaxDropDownItems = ((int)(resources.GetObject("cbxLang.MaxDropDownItems")));
			this.cbxLang.MaxLength = ((int)(resources.GetObject("cbxLang.MaxLength")));
			this.cbxLang.Name = "cbxLang";
			this.cbxLang.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("cbxLang.RightToLeft")));
			this.cbxLang.Size = ((System.Drawing.Size)(resources.GetObject("cbxLang.Size")));
			this.cbxLang.TabIndex = ((int)(resources.GetObject("cbxLang.TabIndex")));
			this.cbxLang.Text = resources.GetString("cbxLang.Text");
			this.cbxLang.Visible = ((bool)(resources.GetObject("cbxLang.Visible")));
			// 
			// buttonApply
			// 
			this.buttonApply.AccessibleDescription = resources.GetString("buttonApply.AccessibleDescription");
			this.buttonApply.AccessibleName = resources.GetString("buttonApply.AccessibleName");
			this.buttonApply.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("buttonApply.Anchor")));
			this.buttonApply.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonApply.BackgroundImage")));
			this.buttonApply.DialogResult = System.Windows.Forms.DialogResult.OK;
			this.buttonApply.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("buttonApply.Dock")));
			this.buttonApply.Enabled = ((bool)(resources.GetObject("buttonApply.Enabled")));
			this.buttonApply.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("buttonApply.FlatStyle")));
			this.buttonApply.Font = ((System.Drawing.Font)(resources.GetObject("buttonApply.Font")));
			this.buttonApply.Image = ((System.Drawing.Image)(resources.GetObject("buttonApply.Image")));
			this.buttonApply.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("buttonApply.ImageAlign")));
			this.buttonApply.ImageIndex = ((int)(resources.GetObject("buttonApply.ImageIndex")));
			this.buttonApply.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("buttonApply.ImeMode")));
			this.buttonApply.Location = ((System.Drawing.Point)(resources.GetObject("buttonApply.Location")));
			this.buttonApply.Name = "buttonApply";
			this.buttonApply.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("buttonApply.RightToLeft")));
			this.buttonApply.Size = ((System.Drawing.Size)(resources.GetObject("buttonApply.Size")));
			this.buttonApply.TabIndex = ((int)(resources.GetObject("buttonApply.TabIndex")));
			this.buttonApply.Text = resources.GetString("buttonApply.Text");
			this.buttonApply.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("buttonApply.TextAlign")));
			this.buttonApply.Visible = ((bool)(resources.GetObject("buttonApply.Visible")));
			// 
			// buttonCancel
			// 
			this.buttonCancel.AccessibleDescription = resources.GetString("buttonCancel.AccessibleDescription");
			this.buttonCancel.AccessibleName = resources.GetString("buttonCancel.AccessibleName");
			this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("buttonCancel.Anchor")));
			this.buttonCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("buttonCancel.BackgroundImage")));
			this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.buttonCancel.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("buttonCancel.Dock")));
			this.buttonCancel.Enabled = ((bool)(resources.GetObject("buttonCancel.Enabled")));
			this.buttonCancel.FlatStyle = ((System.Windows.Forms.FlatStyle)(resources.GetObject("buttonCancel.FlatStyle")));
			this.buttonCancel.Font = ((System.Drawing.Font)(resources.GetObject("buttonCancel.Font")));
			this.buttonCancel.Image = ((System.Drawing.Image)(resources.GetObject("buttonCancel.Image")));
			this.buttonCancel.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("buttonCancel.ImageAlign")));
			this.buttonCancel.ImageIndex = ((int)(resources.GetObject("buttonCancel.ImageIndex")));
			this.buttonCancel.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("buttonCancel.ImeMode")));
			this.buttonCancel.Location = ((System.Drawing.Point)(resources.GetObject("buttonCancel.Location")));
			this.buttonCancel.Name = "buttonCancel";
			this.buttonCancel.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("buttonCancel.RightToLeft")));
			this.buttonCancel.Size = ((System.Drawing.Size)(resources.GetObject("buttonCancel.Size")));
			this.buttonCancel.TabIndex = ((int)(resources.GetObject("buttonCancel.TabIndex")));
			this.buttonCancel.Text = resources.GetString("buttonCancel.Text");
			this.buttonCancel.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("buttonCancel.TextAlign")));
			this.buttonCancel.Visible = ((bool)(resources.GetObject("buttonCancel.Visible")));
			// 
			// labelNote
			// 
			this.labelNote.AccessibleDescription = resources.GetString("labelNote.AccessibleDescription");
			this.labelNote.AccessibleName = resources.GetString("labelNote.AccessibleName");
			this.labelNote.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("labelNote.Anchor")));
			this.labelNote.AutoSize = ((bool)(resources.GetObject("labelNote.AutoSize")));
			this.labelNote.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("labelNote.Dock")));
			this.labelNote.Enabled = ((bool)(resources.GetObject("labelNote.Enabled")));
			this.labelNote.Font = ((System.Drawing.Font)(resources.GetObject("labelNote.Font")));
			this.labelNote.ForeColor = System.Drawing.SystemColors.InfoText;
			this.labelNote.Image = ((System.Drawing.Image)(resources.GetObject("labelNote.Image")));
			this.labelNote.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelNote.ImageAlign")));
			this.labelNote.ImageIndex = ((int)(resources.GetObject("labelNote.ImageIndex")));
			this.labelNote.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("labelNote.ImeMode")));
			this.labelNote.Location = ((System.Drawing.Point)(resources.GetObject("labelNote.Location")));
			this.labelNote.Name = "labelNote";
			this.labelNote.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("labelNote.RightToLeft")));
			this.labelNote.Size = ((System.Drawing.Size)(resources.GetObject("labelNote.Size")));
			this.labelNote.TabIndex = ((int)(resources.GetObject("labelNote.TabIndex")));
			this.labelNote.Text = resources.GetString("labelNote.Text");
			this.labelNote.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("labelNote.TextAlign")));
			this.labelNote.Visible = ((bool)(resources.GetObject("labelNote.Visible")));
			// 
			// PrefsDialog
			// 
			this.AccessibleDescription = resources.GetString("$this.AccessibleDescription");
			this.AccessibleName = resources.GetString("$this.AccessibleName");
			this.AutoScaleBaseSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScaleBaseSize")));
			this.AutoScroll = ((bool)(resources.GetObject("$this.AutoScroll")));
			this.AutoScrollMargin = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMargin")));
			this.AutoScrollMinSize = ((System.Drawing.Size)(resources.GetObject("$this.AutoScrollMinSize")));
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = ((System.Drawing.Size)(resources.GetObject("$this.ClientSize")));
			this.ControlBox = false;
			this.Controls.Add(this.labelNote);
			this.Controls.Add(this.buttonCancel);
			this.Controls.Add(this.buttonApply);
			this.Controls.Add(this.cbxLang);
			this.Controls.Add(this.labelLang);
			this.Enabled = ((bool)(resources.GetObject("$this.Enabled")));
			this.Font = ((System.Drawing.Font)(resources.GetObject("$this.Font")));
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("$this.ImeMode")));
			this.Location = ((System.Drawing.Point)(resources.GetObject("$this.Location")));
			this.MaximizeBox = false;
			this.MaximumSize = ((System.Drawing.Size)(resources.GetObject("$this.MaximumSize")));
			this.MinimizeBox = false;
			this.MinimumSize = ((System.Drawing.Size)(resources.GetObject("$this.MinimumSize")));
			this.Name = "PrefsDialog";
			this.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("$this.RightToLeft")));
			this.StartPosition = ((System.Windows.Forms.FormStartPosition)(resources.GetObject("$this.StartPosition")));
			this.Text = resources.GetString("$this.Text");
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// Selected culture.
		/// </summary>
		internal string Culture
		{
			get
			{
				switch(cbxLang.SelectedIndex)
				{
					case 1:
						return "en";
						//break;

					case 2:
						return "ru";
						//break;

					default:
						return "default";
						//break;
				}
			}
		}
	}
}
